1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing data. Still more particularly, the present invention relates to a computer implemented method, apparatus, and computer user program code for managing an application software partition.
2. Description of the Related Art
Software partitions provide an isolated environment within one operating system instance. In a software partition, processes may run, but do not interact with processes from other software partitions or from the global system itself. Two types of partitions may be found in logical partitioned data processing systems. One type is a system software partition. This type of partition appears as a full fledged virtual instance of the hosting operating system and has its own file systems and system services. Another type of software partition is an application software partition. An application software partition provides a process-isolated environment for a specific application or application suite. This type of partition is intended to be a quick and easy construct with minimal overhead. For example, no separate file systems or system services are present.
Many operating systems, particularly UNIX and Linux operating systems, use a common process tree paradigm, which is a hierarchal tree structure in which all processes are descended from one root process. In Linux and UNIX operating systems, this root process is also referred to as “init”. Many processes and process environments rely on being able to view and trace their branch of this tree structure all the way back to the root process. In a process-isolated environment for a software partition, some concessions must be made to this requirement without forcing the applications themselves to change. As a result, a software partition provides a process at the root of its isolated tree of processes that at least appears to be “init”.
This type of problem is solved in system software partitions by running a slightly customized version of the real “init” executable within the software partition. This type of solution, however, is not viable for an application software partition. The real root process is responsible for the management of system services in this type of partition, which are not desired in application software partitions. Further, many of these services experience conflicts if multiple instances are run in the same file system space.
When a process terminates, the parent of that process is notified and responsible for cleaning up, which involves performing operations like deleting data structures and releasing memory that may have been used by the process. During this clean up phase, the return status and resource usage for the exiting process are available to the parent process.
When a “parent” process in a process tree terminates, its orphaned “children” must be assigned a new position within the process tree. Typically, such processes are assigned or “re-parented” to the system's “init” or root process. This reallocation of processes within the hierarchy is performed using semantics such that those processes do not impose the same clean up requirements on the root process when they exit.
A problem arises when a process in an application software partition is orphaned in the manner described above. Existing mechanisms allow resource usage statistics and the return code of the exiting process to be collected by its parent process. However, the statistics of the child processes or “leaves” are lost when they are re-parented to the global root or “init” process. Further, the launcher of the processes may exit before those processes terminate because these processes leave the chain of the launcher, which is no longer aware of the processes. As a result, a false indication that an application software partition is completed or finished working may occur, and the resource usage statistics for the application software partition may be inaccurate. In addition, the paradigm of software partitioning is violated by having a process inside the software partition parented to a process outside of the software partition.
Therefore, it would be advantageous to have an improved computer implemented method, apparatus, and computer usable program code for managing application software partitions.